﻿<phone:PhoneApplicationPage xmlns:TanisControls="clr-namespace:Tanis.Controls"
    x:Class="Tanis.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:assets="clr-namespace:DeepForest.Phone.Assets.Shell;assembly=DeepForest.Phone.Assets"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True" d:DesignHeight="696" d:DesignWidth="480" >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="CITY NAME" Name="_pivot" SelectionChanged="_pivot_SelectionChanged">
            
            <controls:PivotItem Header="{Binding Path=LocalizedResources.PageTitleFavouriteRoutes, Source={StaticResource LocalizedStrings}}" Name="_favouriteRouteCtrl">
                <TanisControls:FavoritesControl />
            </controls:PivotItem>
 
            <controls:PivotItem Header="{Binding Path=LocalizedResources.PageTitleRouteFinder, Source={StaticResource LocalizedStrings}}" Name="_routeFinderCtrl">
                <TanisControls:RouteFinderControl />
            </controls:PivotItem>

            <controls:PivotItem Header="{Binding Path=LocalizedResources.PageTitleRouteList, Source={StaticResource LocalizedStrings}}" Name="_routeListCtrl">
                <TanisControls:RouteList />
            </controls:PivotItem>
        
            <controls:PivotItem 
                Header="{Binding Path=LocalizedResources.PageTitleRouteDetails, Source={StaticResource LocalizedStrings}}" 
                Name="_routeDetailsPivotPage"
                Visibility="Collapsed">
                <TanisControls:RouteDetailsControl x:Name="_routeDetailsCtrl"/>
              </controls:PivotItem>
        
        </controls:Pivot>
    </Grid>

    <!-- Application button / menu bar -->
    <assets:PhoneApplicationPage.ApplicationBar>
        <assets:ApplicationBar IsVisible="True" IsMenuEnabled="True" x:Name="_applicationBar">
            <assets:ApplicationBar.MenuItems>
                <assets:ApplicationBarMenuItem Click="OnSettingsClick" Text="{Binding Path=LocalizedResources.PageTitleSettings, Source={StaticResource LocalizedStrings}}"/>
            </assets:ApplicationBar.MenuItems>
        </assets:ApplicationBar>
    </assets:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>